<div class="span-18 options-holder">
	<?= $this->partial('_partial/common_head.phtml', array('controller' => 'admin')) ?>
</div>
<div class="span-4 last options-holder">
	<ul class="options-list top-right">
		<li><a class="action trash" href="<?php print $this->url(array(
			'module' => 'gallery',
			'controller' => 'admin',
			'action' => 'cleancache'
		)); ?>">Wyczyść Cache</a></li>
	</ul>
</div>

<hr class="bottom"/>

<div class="span-14">
	<div class="span-5 border">
		<h3>Wybierz kategorię</h3>
		<select id="gallery-category" size="3"  style="width: 100%;"></select>
		<p class="bottom small">Galerie należące do kategorii</p>
		<select id="gallery-gallery" size="5" style="width: 100%;"></select>
	</div>
	<div class="span-9 last">
		<div class="options-holder">
			<h3>Zdięcia w galerii</h3>
			<ul class="options-list top-right">
				<li><a id="gallery-images-refresh" class="action refresh small" href="">odśwież</a></li>
			</ul>
		</div>
		<div id="gallery-images" class="gallery-images-list"></div>
	</div>

	<hr/>

	<div class="span-14 last">
		<div class="options-holder">
			<h3>Zdięcia nieprzypisane</h3>
			<ul class="options-list top-right">
				<li><a id="gallery-images-free-refresh" class="action refresh small" href="">odśwież</a></li>
			</ul>
		</div>
		<div id="gallery-images-free" class="gallery-images-list"></div>
	</div>
</div>
<div class="span-8 last">

<?php
    $this->headScript()
      ->appendFile('js/library/swfupload/swfupload.js')
      ->appendFile('js/library/swfupload/swfupload.swfobject.js')
      ->appendFile('js/library/swfupload/swfupload.queue.js')
      ->appendFile('js/library/swfupload/fileprogress.js')
      ->appendFile('js/library/swfupload/handlers.js');

    $this->headLink()
      ->appendStylesheet('js/library/swfupload/css/default.css');
?>
<?php $this->headScript()->captureStart();?>
var swfu;

SWFUpload.onload = function () {
	var settings = {
		flash_url : "js/library/swfupload/swfupload.swf",
		upload_url: "<?php print KontorX_View_Helper_BaseUrl::getDomain() . $this->url(array('module' => 'gallery', 'controller' => 'image', 'action' => 'upload','format' => 'gwtjson'),'default',true) ?>",	// Relative to the SWF file
		file_size_limit : "100 MB",
		file_types : "*.jpg;*.jpeg;*.png;*.gif;",
		file_types_description : "All Files",
		file_upload_limit : 100,
		file_queue_limit : 0,
		custom_settings : {
			progressTarget : "fsUploadProgress",
			cancelButtonId : "btnCancel"
		},
		debug: false,

		// Button Settings
		button_placeholder_id : "spanButtonPlaceholder",
		button_width: 61,
		button_height: 22,
		button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
		button_cursor: SWFUpload.CURSOR.HAND,

		// The event handler functions are defined in handlers.js
		swfupload_loaded_handler : swfUploadLoaded,
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess,
		upload_complete_handler : uploadComplete,
		queue_complete_handler : queueComplete,	// Queue plugin event
		
		// SWFObject settings
		minimum_flash_version : "9.0.28",
		swfupload_pre_load_handler : swfUploadPreLoad,
		swfupload_load_failed_handler : swfUploadLoadFailed
	};

	swfu = new SWFUpload(settings);
}
<?php $this->headScript()->captureEnd();?>



    <h3 class="bottom">Załanczanie zdjęć</h3>
    <p class="msg-info small">Metoda podstawowa - działa na wyszystkich typach przeglądarek</p>
    <form id="upload-form" enctype="multipart/form-data" method="post" action="<?php print $this->url(array('module' => 'gallery', 'controller' => 'image', 'action' => 'upload'),'default',true) ?>">
    <?= $this->formFile('photoupload') ?>
    <?= $this->formSubmit(null, 'Uploaduj') ?>
    </form>

    <p class="msg-info small">Metoda zaawansowana -umożliwia przesyłanie wielu plików jednocześnie. Nie działa na wszystkich typach przeglądarek!</p>

	<div id="divSWFUploadUI">
		<div class="fieldset flash" id="fsUploadProgress">
			<span class="legend">Kolejka wysyłania</span>
		</div>
		<p id="divStatus">0 Plików wysłanych na serwer</p>
		<p style="position: relative;">
			<span id="spanButtonPlaceholder"></span>
			<input id="btnUpload" type="button" value="Przeglądaj.."/>
			<input id="btnCancel" type="button" value="Anuluj wysyłanie plików" disabled="disabled" />
		</p>
		<br style="clear: bloth;" />
	</div>
	<noscript style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px;">
		We're sorry.  SWFUpload could not load.  You must have JavaScript enabled to enjoy SWFUpload.
	</noscript>
	<div id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
		SWFUpload is loading. Please wait a moment...
	</div>
	<div id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
		SWFUpload is taking a long time to load or the load has failed.  Please make sure that the Flash Plugin is enabled and that a working version of the Adobe Flash Player is installed.
	</div>
	<div id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
		We're sorry.  SWFUpload could not load.  You may need to install or upgrade Flash Player.
		Visit the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe website</a> to get the Flash Player.
	</div>

</div>